Various ECUs are installed in a typical vehicle for controlling various vehicle equipment, such as a vehicle engine. An ECU for vehicle engine control also diagnoses various conditions, that is, checks whether each condition is normal or abnormal based on data from various vehicle devices such as sensors, switches and actuators mounted in the vehicle. When a condition is determined as abnormal, the ECU stores abnormality data, such as a diagnostic trouble code (DTC), as the diagnosis result indicative of abnormality in a rewritable memory where the stored abnormality data is maintained.
The ECU of the above type may operate in a state where the ECU has not yet been installed or assembled in the vehicle, such as during manufacture of the vehicle. In such a state, some of peripheral equipment such as sensors, switches and actuators are not yet connected to the ECU. When the ECU executes diagnosis in such a state, the incomplete assembly may be detected as an abnormality, and unnecessary or erroneous diagnosis results may be stored in a memory.
To avoid such storing of unnecessary or erroneous diagnosis results, JP 2006-291730A proposes an ECU that checks whether a vehicle is actually used by a user based on an operating condition of the vehicle. Such an operating condition may be a vehicle travel speed or engine revolutions. The ECU starts to store diagnosis results in a memory after it has been determined that the vehicle is actually used by the user. The memory is a standby RAM continuously backed up by electric power to back up storage of the stored data even after the supply of electric power to the ECU is turned off, or an EEPROM as a nonvolatile memory.
However, in the conventional electronic control apparatus, it is not possible to determine the actual time the storage begins, since the condition for starting to store the diagnosis results includes the operating state which varies from vehicle to vehicle or from user to user. Such an operating state is not considered to occur in the manufacturing line of the vehicle. Any diagnosis results of abnormalities, which have occurred relatively immediately after the vehicle has begun to be used by the user should be necessarily originally stored. However, in the conventional electronic control apparatus, such diagnosis results cannot be stored in the memory, unless the predetermined operating state such as the vehicle travel is satisfied.
It should further be noted that with regard to vehicle diagnosis, the regulation of the California Air Resources Board (CARB) requires that any diagnostic trouble code (DTC) that has been stored as a confirmed fault code based on diagnosis result must be kept stored in a rewritable nonvolatile memory such as EEPROM of an ECU as a permanent failure code, such as a permanent diagnostic trouble code (PDTC). In order to prevent tampering and concealment of, for example, potential exhaust emissions failures, the regulation also stipulates that the PDTC must not be erasable by a command from an external tool capable of communicating with the ECU.